package com.daohang361.imqq.pugin.service;

import org.apache.mina.core.session.IoSession;

import com.daohang361.imqq.Asycore.Connector;
import com.daohang361.imqq.Asycore.QQUser;
import com.daohang361.imqq.ServerContex.SessionContex;
import com.daohang361.imqq.encoder.InterfaceEncoder;
import com.daohang361.imqq.hotLoader.PuginManager;
import com.daohang361.imqq.service.InterfaceService;

/** 
 * @author naner E-mail:likun3344@163.com 
 * @create time：2011-6-21 下午05:13:22 
 */
public class GetFriendHead implements InterfaceService {

	@Override
	public Object doService(Object... o) {
		QQUser myqq = SessionContex.getQQUser(Integer.parseInt( o[0]+""));
		Connector connector =SessionContex.getConnector(Integer.parseInt( o[0]+""));
		InterfaceEncoder encoder = ((InterfaceEncoder) PuginManager.GetPuginByKey("Encoder0125"));
		IoSession session=connector.getSession();
		byte[] temp=encoder.encode(myqq, 0x0125,o);
		myqq.setCommand(0x0125);
		myqq.addDirectSendByte(temp);
		session.write(myqq);
		return null;
	}

	@Override
	public Object invoke(Object... o) {
		// TODO Auto-generated method stub
		return null;
	}

}
